
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>男装专区</title>
    <link rel="stylesheet" type="text/css" href="/css/stroe/loaders.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/stroe/loading.css"/>
    <link rel="stylesheet" type="text/css" href="/css/stroe/base.css"/>
    <link rel="stylesheet" type="text/css" href="/css/stroe/style.css"/>
    <script src="/js/jquery/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <script src="/js/bootstrap/js/bootstrap.min.js"></script>
    <script src="/js/jquery/jquery.form.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/common.js"></script>
    <script type="text/javascript">
        $(window).load(function(){
            $(".loading").addClass("loader-chanage")
            $(".loading").fadeOut(300)
        });
        $(function () {
            var users = sessionStorage.getItem("user");
            var user = JSON.parse(users);
            function query() {
                $.get("/buys/"+user.id+"/commoditys",{currentPage:currentPage,pageSize:4},function (data) {
                    $.merge(dataList, data.list)
                    $(".fixed-conta").renderValues({list: dataList},{
                        'setHref':function (item,value) {
                            $(item).attr("href",$(item).attr("href")+value)
                        }
                    });
                    currentPage += 1;
                    totalPage = data.pages;
                    $(".dele").click(function () {
                        $.get("/buys/"+params.id+"/deletes",function (data) {
                            if (data.success){
                                window.location.reload();
                            }else {
                                $(document).dialog({
                                    type: 'notice',
                                    infoText: '失败',
                                    autoClose: 1500,
                                    position: 'bottom'
                                })
                            }
                        })
                    })
                });
            }
            query();
            var currentPage=1;
            var dataList = [];
            var totalPage;
            $(window).scroll(function () {
                if ($(window).height() + $(window).scrollTop() >= $(document).height()) {
                    if (currentPage <= totalPage) {
                        query();
                    } else {
                        $(document).dialog({
                            type: 'notice',
                            infoText: '到底了',
                            autoClose: 1500,
                            position: 'bottom'
                        })
                    }
                }
            });

            var params = getParams();

        })
    </script>

</head>
<!--loading页开始-->
<div class="loading">
    <div class="loader">
        <div class="loader-inner pacman">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
</div>
<!--loading页结束-->
<body>
<header class="top-header fixed-header">
    <a class="icona" href="stroepersonal.html">
        <img src="/img/store/left.png"/>
    </a>
    <h3>全部订单</h3>
    <a class="iconb" href="shopcar.html">
    </a>
</header>

<div class="contaniner fixed-conta">
    <section class="order" render-loop="list">
        <dl >
            <dt>
                <time render-html="list.commodity.createTime"></time>
                <span render-html="list.statueName"></span>
            </dt>
            <ul>
                <a href="detail.html?id=" render-fun="setHref" render-key="list.commodity.id">
                    <figure><img src="/img/store/classify-ph03.png"/></figure>
                    <li>
                        <p render-html="list.commodity.name"></p>
                        <small render-html="list.commodity.color"></small>
                        <span render-html="list.commodity.size"></span>
                        <b render-html="list.commodity.discountPrice"></b>
                        <strong>×1</strong>
                    </li>
                </a>
            </ul>
            <dd>
                <h3>商品总额</h3>
                <i render-html="list.commodity.discountPrice"></i>
            </dd>
            <dd>
                <a  class="order-que" href="order.html?id=" render-fun="setHref" render-key="list.id"><p class="dele">确认收货</p></a>
                <a type="button" href="wuliu.html?id=" render-fun="setHref" render-key="list.commodity.id">查看物流</a>
                <a  href="order.html?id=" render-fun="setHref" render-key="list.id"><p class="dele">取消订单</p></a>
            </dd>
        </dl>
    </section>
</div>
</body>
</html>